// 属性管理模块TS类型
export interface ResponseData {
  code: number;
  message: string;
  ok: boolean;
}

// 分类ts类型
export interface CategoryObj {
  id: number | string;
  name: string;
  category1Id?: number;
  category2Id?: number;
}

// 分类接口返回数据的类型
export interface CategoryResponseData extends ResponseData {
  data: CategoryObj[];
}

// 分类对象仓库类型
export interface CategoryState {
  c1Id: number | string;
  c2Id: number | string;
  c3Id: number | string;
  c1Arr: CategoryObj[];
  c2Arr: CategoryObj[];
  c3Arr: CategoryObj[];
}

// 属性值对象的ts类型
export interface AttrValue {
  id?: number;
  valueName: string;
  attrId?: number;
  isEdit?: boolean;
}

// 属性值数组类型
export type AttrValueList = AttrValue[];

// 属性对象
export interface Attr {
  id?: number;
  attrName: string;
  categoryId: number | string;
  categoryLevel: number;
  attrValueList: AttrValueList;
}

// 属性对象数组类型
export type AttrList = Attr[];

// 属性接口返回的数据的ts类型
export interface AttrResponseData extends ResponseData {
  data: AttrList;
}
